package cn.sdormitory.service;

import cn.sdormitory.workflow.entity.StuLeaveApply;
import cn.sdormitory.basedata.vo.BClassStudentVo;
import cn.sdormitory.smartdor.entity.SdLeave;
import cn.sdormitory.smartdor.vo.SdStudentLeaveVo;

import java.util.List;
import java.util.Map;

/**
 * @创建人：zhouyang
 * @创建时间：2021/11/15 17:11
 * @version：V1.0
 */
public interface AppSdStudentLeaveService {
    List<SdStudentLeaveVo> getStuLeaveByDateAndStuNo(String studentNo, String startDate, String endDate) ;
    int addStudentLeave(SdStudentLeaveVo sdStudentLeaveVo);
    int create(SdLeave sdLeave);
    int update(SdLeave sdLeave);
    List<BClassStudentVo> getLeaveByClaNameAndStuName(String className, String studentName);
    int deleteStuLeave(Long leaveId,String studentNo,String startDate,String endDate);
    List<SdLeave> getStuLeavesList(SdLeave sdLeave);
    int updateStuLeaves(SdLeave sdLeave);

    /**
     * 学生创建请假申请
     * @param leaveApply
     * @return
     */
    int createLeaveApply(StuLeaveApply leaveApply);
    
    /**
     * 学生创建请假申请
     * @param leaveApply
     * @return
     */
    int createNewLeaveApply(StuLeaveApply leaveApply);

    /**
     * 查询当前学生请假申请列表
     * @param studentId
     * @return
     */
    List<StuLeaveApply> getStuLeaveApplyList(Long studentId);

    /**
     * 班主任查询学生请假申请单列表
     * @param clsTeacherId 班主任Id
     * @param status 审批状态
     */
    List<Map<String, Object>> getStuLeaveApplyByClsTeacherId(Long clsTeacherId, String status);

    /**
     * 更新学生请假申请单状态
     * @param apply
     * @return
     */
    int updateStuLeaveApplyStatus(StuLeaveApply apply);

    /**
     * 学生撤回请假申请
     * @param stuLeaveApplyId
     * @return
     */
    int revokeStuLeaveApply(Long stuLeaveApplyId);

    /**
     * 查询请假学生相关信息
     * @param studentId 学生id
     * @return
     */
    List<StuLeaveApply> studentLeaveCorrelationInfo(Long studentId);
    
    /**
     * 班主任撤销请假申请
     * @author alex
     * @param: stuLeaveApply
     * @date 2024/10/28 15:41
     * @return
     */
    void cancelStuLeaveApply(StuLeaveApply stuLeaveApply);
    
    /**
     * 学生销假申请
     * @author alex
     * @param: leaveApply
     * @date 2024/11/4 11:00
     * @return
     */
    int studentCancelLeaveApply(StuLeaveApply leaveApply);
}
